<?php
class cIndex extends ControllerBase{

	protected $defaultaction = 'dashboard';
	protected $template = 'admin/index.html';
  
	protected $route = array(
								"cliente"=>"cCliente",
								"reports"=>"cReports",
								 );
								  
							
	public function init(){
		include('app/controllers/init.php');
	}
	
	

	public function rights(){
		if ( $this->action == 'login' ) return true;
		if ( $this->action == 'logout' ) return true;
	
		if ( ! isset($_SESSION['login']) ){
			$this->redirect("public", "login");
			die("NO LOGIN");	
			return false;
		}	
		
		return true;
	}
	
	public function dashboardAction(){
		global $smarty;
		$user=$_SESSION['login'];
		$smarty->assign('login',$user);
		
	}
	
}

?>
